﻿using EasyAdmin.Application.Contracts.Systems.Roles.Dtos;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyAdmin.Application.Contracts.Systems.Roles
{
    public interface IRoleAppService
    {
        /// <summary>
        /// 分页数据
        /// </summary>
        /// <returns></returns>
        Task<SqlSugarPagedList<RoleOutput>> Page(RolePageCondition condition);

        /// <summary>
        /// 获得所有角色
        /// </summary>
        /// <returns></returns>
        Task<List<RoleOutput>> GetAllRoles();


        Task ChangeRoleStatusByRoleId(long roleId);
      
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <returns></returns>
        Task DeleteRoleById(long roleId);
        
        /// <summary>
        /// 创建角色
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateRole(CreateUpdateRoleDto input);
        
        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateRole(CreateUpdateRoleDto input);

        Task<RoleOutput> GetRoleByRoleId(long roleId);
    }
}
